<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <title>MyBatis 整合  Spring 3</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
  
  <a href="add.do">添加</a>
  
  <table width="100%" border="1" cellpadding="1" cellspacing="1">
  <tr>
  <td width="50" align="center">ID</td>
  <td width="80" align="center">用户名</td>
  <td width="80" align="center">密码</td>
  <td width="80" align="center">Email</td>
  <td width="80" align="center">角色</td>
   <td width="100" align="center">操作</td>
  </tr>
      <c:forEach items="${list}" var="data">              
    <tr>
  <td align="center">${data.id}</td>
  <td align="center"> ${data.username}</td>
  <td align="center">${data.password} </td>
  <td align="center">${data.email} </td>
  <td align="center"><c:choose>
  <c:when test="${data.roleId eq 0}">男 </c:when>
  <c:otherwise>女</c:otherwise>

  
   </c:choose>   </td>
   <td align="center">  <a href="edit.do?id=${data.id}">修改</a> | <a href="del.do?id=${data.id}">删除</a> 
</td>
  </tr>
  
   </c:forEach>
  </table>
  
    <div align="center">${pager}</div>
  </body>
</html>


